<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .div1,.div2,.div3{
      padding: 50px;
    }
    .div1{
      background-color: rgb(151, 96, 96);
    }
    .div2{
      background-color: rgb(146, 196, 29);
    }
    .div3{
      background-color: rgb(16, 175, 196);
    }
  </style>
</head>
<body>
  <div id="app">
    <!-- <div @click="fn1(1)" class="div1">
      <div @click="fn2(2)" class="div2">
        <div @click.stop="fn3(3)" class="div3"></div>
      </div>
    </div> -->
    <div @click="fn1(1)" class="div1">
      <div @click.capture="fn2(2)" class="div2">
        <div @click="fn3(3)" class="div3"></div>
      </div>
    </div>
    <button @click.once="clickBtn">按钮</button>
    <a @click.prevent href="http://www.baidu.com">百度一下</a>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      data: {
        isShow: true
      },
      methods: {
        fn1(n){
          console.log(n)
        },
        fn2(n){
          console.log(n)
        },
        fn3(n){
          console.log(n);
        },
        clickBtn(){
          alert(1)
        }
      }
    })
    vm.$mount('#app');
  </script>
</body>
</html>